home *** CD-ROM | disk | FTP | other *** search
- /*{{{}}}*/
- /*{{{ #includes*/
- #ifdef CONFIG_H
- # include "config.h"
- #endif
-
- #include <sys/types.h>
- #include <unistd.h>
- #include <limits.h>
- #include <sys/stat.h>
- #include <string.h>
- #include <stdlib.h>
- #include <stdio.h>
-
- #include <lib/ori_bool.h>
- #include <lib/ori_add_lib.h>
- /*}}} */
-
- /*{{{ is_file*/
- boolean is_file(FILE * const f,char const * const name)
- { struct stat buff;
-
- return
- ( ( (f && !fstat(fileno(f),&buff))
- || (name && !stat(name,&buff))
- )
- ? !S_ISDIR(buff.st_mode)
- : True
- );
- }
- /*}}} */
-